<!--
<message ref="message"></message>

this.$refs.message.success({
    message: '保存成功啦!'
});
 -->
<template></template>

<script>
  export default {
    methods: {
      success (options) {
        options.type = 'success';
        this.show(options);
      },
      error (options) {
        options.type = 'error';
        this.show(options);
      },
      warning (options) {
        options.type = 'warning';
        this.show(options);
      },
      info (options) {
        options.type = 'info';
        this.show(options);
      },
      show (options) {
        if (!options.showClose) {
          options.showClose = true;
        }
        this.$message(options);
      }
    }
  };
</script>
